<div class="panel panel-default">
    <table class="table table-striped table-hover">
        <!--table class="table table-striped table-hover"-->
        <!--table class="table table-bordered table-hover"-->
        <!--table class="table table-condensed table-hover"-->
        <thead>
            <tr>
                <th>#</th>
                <th>邮箱</th>
                <th>昵称</th>
                <th>身份</th>
            </tr>
        </thead>
        <tbody id="accordion">
            {{range .uesrs_list}}
            <tr class="user_info_row">
                <td>{{.Id}}</td>
                <td>{{.Email}}</td>
                <td>{{.Nick}}</td>
                <td>{{.Class | GetUserClassName}}</td>
                <td><button class="btn btn-primary" data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#btn_box_{{.Id}}">MORE</button></td>
            </tr>
            <tr id="btn_box_{{.Id}}" class="panel-collapse collapse">
                <div id="{{.Id}}" class="user_info row col-sm-10">
                    <td class="panel-body"> </td>
                    <td><button type="button" class="user_look btn btn-default">查看TODO</button></td>
                    <td><button type="button" class="user_modify btn btn-default" data-toggle="modal" data-target="#modifyModal_{{.Id}}">修改</button></td>
                    <td><button type="button" class="user_delete btn btn-default" target-id="{{.Id}}">刪除</button></td>
                </div>
            </tr>



            <div class="modal fade" id="modifyModal_{{.Id}}" tabindex="-1" role="dialog" aria-labelledby="modifyModal_{{.Id}}" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content col-sm-6">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title" id="{{.Id}}">修改 {{.Nick}} 的信息</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-group">
                                    <label for="">昵称:</label>
                                </div>
                                <div class="form-group">
                                    <input name="nick" class="input_nick col-sm-8" value="{{.Nick}}"/>
                                </div>
                                <div class="row"></div>
                                <div class="form-group">
                                    <label for="">身份:</label>
                                </div>
                                <div class="row"></div>
                                <div class="form-group">
                                    <input name="class" class="input_class hide" value="{{.Class}}"/>
                                    <button type="button" class="col-sm-8 btn btn-primary dropdown-toggle" data-toggle="dropdown">
                                    <div id="class_name_{{.Id}}" class="btn-group class_name">{{.Class | GetUserClassName}}</div>
                                    <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li><a href="javascript://" onclick="set_class(0,'{{.Id}}','普通成员');">普通成员</a></li>
                                        <li><a href="javascript://" onclick="set_class(1,'{{.Id}}','管理员');">管理员</a></li>
                                        <li><a href="javascript://" onclick="set_class(2,'{{.Id}}','超级管理员');">超级管理员</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" onclick="user_save_click('{{.Id}}');">保存修改</button>
                                </a>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
            {{end}}
        </tbody>
    </table>
</div>